package com.tedu.charging.service.bill.feignclient;

import com.tedu.charging.common.pojo.param.UserGetBalanceParam;
import com.tedu.charging.common.pojo.param.UserUpdateBalanceParam;
import com.tedu.charging.common.pojo.vo.VehicleVO;
import com.tedu.charging.common.pojo.web.ServerResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.math.BigDecimal;

@FeignClient("userService")
//@RequestMapping(""),接口不能加RequestMapping
public interface UserClient {
    @PostMapping(value = "/charge/user/getBalance")
    public ServerResult<BigDecimal> getBalance(UserGetBalanceParam param);

    @PostMapping(value = "/charge/user/upDateBalance")
    public ServerResult<String> upDateBalance(UserUpdateBalanceParam userUpdateBalanceParam);
    @GetMapping("/getVehicleByUserId/{userId}")
    public ServerResult<VehicleVO> getVehicleByUserId(@PathVariable("userId") Integer userId);

}
